<!DOCTYPE html>
<html>
	<head>
		<meta charset="UTF-8">
		<link rel="stylesheet" href="../bootstrap-3.3.5-dist/css/bootstrap.min.css" />
		<script src="../js/jQuery-2.1.4.min.js"></script>
		<script type="text/javascript" src="../bootstrap-3.3.5-dist/js/bootstrap.min.js" ></script>
		<title></title>
	</head>
	<body>
		 <button data-toggle="modal" class="btn btn-primary btn-sm fa fa-plus" data-target="#addChart" type="button" >添加</button>
                  
		<div class="modal fade" id="addChart" tabindex="-1" role="dialog"
	aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-dialog modal-lg" style="width: 90%;">
		<div class="modal-content">
			<div class="modal-header">
				<button type="button" class="close" data-dismiss="modal"
					aria-hidden="true">&times;</button>
				<!-- 模态框标题 -->
				<h4 class="modal-title" id="myModalLabel">添加</h4>
			</div>
			<form class="form-horizontal" action="${context}/engine/addChart"
				method="post" id="addChartForm">
				<!-- 模态框正文 -->
				<div class="modal-body">
					<h1>图表配置</h1>
					<div class="form-group">
						<label for="engineName" class="col-sm-2 control-label">统计图表名称</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="name"
								name="name" placeholder=""
								autocomplete="off">
						</div>
						<input type="hidden" name="biasingId" value="${biasingId }">
						<label for="engineName" class="col-sm-2 control-label">图表类型</label>
						<div class="col-sm-4">
							<select class="form-control" id="dictionnaryId" name="type">
							<c:forEach var="dictionnary" items="${chartTypeAll}" varStatus="engineListStatus">
								<option value="${dictionnary.name}">${dictionnary.value}</option>
							</c:forEach>
							</select>
						</div>
					</div>
					
			
					<div class="form-group" id="Cont_1">
						<label class="col-sm-2 control-label">分类字段</label>
						<div class="col-sm-4">
							<select class="form-control" id="aggField" name="aggFielId">
							<c:forEach var="aggField" items="${fieldList}" varStatus="engineListStatus">
							<c:if test="${aggField.display_name!=null }">
								<option value="${aggField.fieldId}">${aggField.display_name}</option>
							</c:if>
							<c:if test="${aggField.display_name==null }">
							<option value="${aggField.fieldId}">${aggField.name}</option>
							</c:if>
							</c:forEach>
							</select>
						</div>
						<label for="number" class="col-sm-2 control-label">聚合数量</label>
					 	<div class="col-sm-4">
							<input type="number" class="form-control" id="number" name="number" autocomplete="off"
							placeholder="留空即显示所有值"/>
						</div>
					</div>
					
				
					<div class="form-group">
						<label for="sort" class="col-sm-2 control-label">排序</label>
					 	<div class="col-sm-4">
							<input type="number" class="form-control" id="sort" name="sort"/>
						</div>
						<div class="col-sm-offset-2 col-sm-4">
						 		<div class="checkbox">
							<label for="linkage">
									<input type="checkbox" id="linkage" checked="checked" name="linkage"/>
						 			是否连动
							</label>
						 		</div>
							</div>
						
					</div>
				
				<h1>维度配置</h1>
				<!--------------------------------<br /><br />-->
  			<div>	
  				<div class="form-group">
						<label class="col-sm-2 control-label">字段</label>
						<div class="col-sm-4">
							<select class="form-control" id="field" name="FieldId">
							<c:forEach var="field" items="${fieldListCopy}" varStatus="engineListStatus">
							<c:if test="${field.display_name==null}">
								<option value="${field.fieldId}">${field.name}</option>
							</c:if>	
							<c:if test="${field.display_name!=null}">
							<option value="${field.fieldId}">${field.display_name}</option>
							</c:if>	
							</c:forEach>
							</select>
						</div>
						<label for="engineName" class="col-sm-2 control-label">聚合类型</label>
						  <div class="col-sm-4">
								<select class="form-control" id="aggField" name="aggType">
								<c:forEach var="dictionnary" items="${dictionnaryList}" varStatus="engineListStatus">
								
									<option value="${dictionnary.name}">${dictionnary.value}</option>
								</c:forEach>
								</select>
							</div>
					</div>
					
				
					<div class="form-group">
					<input type="hidden" name="biasingId" value="${biasingId }">
					<input type="hidden" name="chartId" value="${chartId}">
						<label for="engineName" class="col-sm-2 control-label">维度名称</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="name"
								name="name" placeholder=""
								autocomplete="off">
						</div>
						<label for="sort" class="col-sm-2 control-label">排序规则</label>
					 	<div class="col-sm-4">
							<select class="form-control" id="sort" name="sort">
								<option value="name_asc">按名称升序</option>
								<option value="name_desc">按名称降序</option>
								<option value="val_asc">按值升序</option>
								<option value="val_desc">按值降序</option>
							</select>
						</div>
						
					</div>
				
					
					<div class="form-group">
						<label for="isSort" class="col-sm-2 control-label">确认排序</label>
					 	<div class="col-sm-10" >
							<input type="checkbox" 
									id="isSort" 
									name="isSort" 
									style=" margin-top: 10px;"
									data-toggle="tooltip" 
									data-placement="right" 
									title="勾选后图表将按此维度排序"
									>
						</div>
					</div>
					
  
  				</div>
  				<div>	
  				<div class="form-group">
						<label class="col-sm-2 control-label">字段</label>
						<div class="col-sm-4">
							<select class="form-control" id="field" name="FieldId">
							<c:forEach var="field" items="${fieldListCopy}" varStatus="engineListStatus">
							<c:if test="${field.display_name==null}">
								<option value="${field.fieldId}">${field.name}</option>
							</c:if>	
							<c:if test="${field.display_name!=null}">
							<option value="${field.fieldId}">${field.display_name}</option>
							</c:if>	
							</c:forEach>
							</select>
						</div>
						<label for="engineName" class="col-sm-2 control-label">聚合类型</label>
						  <div class="col-sm-4">
								<select class="form-control" id="aggField" name="aggType">
								<c:forEach var="dictionnary" items="${dictionnaryList}" varStatus="engineListStatus">
								
									<option value="${dictionnary.name}">${dictionnary.value}</option>
								</c:forEach>
								</select>
							</div>
					</div>
					
				
					<div class="form-group">
					<input type="hidden" name="biasingId" value="${biasingId }">
					<input type="hidden" name="chartId" value="${chartId}">
						<label for="engineName" class="col-sm-2 control-label">维度名称</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="name"
								name="name" placeholder=""
								autocomplete="off">
						</div>
						<label for="sort" class="col-sm-2 control-label">排序规则</label>
					 	<div class="col-sm-4">
							<select class="form-control" id="sort" name="sort">
								<option value="name_asc">按名称升序</option>
								<option value="name_desc">按名称降序</option>
								<option value="val_asc">按值升序</option>
								<option value="val_desc">按值降序</option>
							</select>
						</div>
						
					</div>
				
					
					<div class="form-group">
						<label for="isSort" class="col-sm-2 control-label">确认排序</label>
					 	<div class="col-sm-10" >
							<input type="checkbox" 
									id="isSort" 
									name="isSort" 
									style=" margin-top: 10px;"
									data-toggle="tooltip" 
									data-placement="right" 
									title="勾选后图表将按此维度排序"
									>
						</div>
					</div>
					
  
  				</div>
  				<div>	
  				<div class="form-group">
						<label class="col-sm-2 control-label">字段</label>
						<div class="col-sm-4">
							<select class="form-control" id="field" name="FieldId">
							<c:forEach var="field" items="${fieldListCopy}" varStatus="engineListStatus">
							<c:if test="${field.display_name==null}">
								<option value="${field.fieldId}">${field.name}</option>
							</c:if>	
							<c:if test="${field.display_name!=null}">
							<option value="${field.fieldId}">${field.display_name}</option>
							</c:if>	
							</c:forEach>
							</select>
						</div>
						<label for="engineName" class="col-sm-2 control-label">聚合类型</label>
						  <div class="col-sm-4">
								<select class="form-control" id="aggField" name="aggType">
								<c:forEach var="dictionnary" items="${dictionnaryList}" varStatus="engineListStatus">
								
									<option value="${dictionnary.name}">${dictionnary.value}</option>
								</c:forEach>
								</select>
							</div>
					</div>
					
				
					<div class="form-group">
					<input type="hidden" name="biasingId" value="${biasingId }">
					<input type="hidden" name="chartId" value="${chartId}">
						<label for="engineName" class="col-sm-2 control-label">维度名称</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="name"
								name="name" placeholder=""
								autocomplete="off">
						</div>
						<label for="sort" class="col-sm-2 control-label">排序规则</label>
					 	<div class="col-sm-4">
							<select class="form-control" id="sort" name="sort">
								<option value="name_asc">按名称升序</option>
								<option value="name_desc">按名称降序</option>
								<option value="val_asc">按值升序</option>
								<option value="val_desc">按值降序</option>
							</select>
						</div>
						
					</div>
				
					
					<div class="form-group">
						<label for="isSort" class="col-sm-2 control-label">确认排序</label>
					 	<div class="col-sm-10" >
							<input type="checkbox" 
									id="isSort" 
									name="isSort" 
									style=" margin-top: 10px;"
									data-toggle="tooltip" 
									data-placement="right" 
									title="勾选后图表将按此维度排序"
									>
						</div>
					</div>
					
  
  				</div>
  				<div>	
  				<div class="form-group">
						<label class="col-sm-2 control-label">字段</label>
						<div class="col-sm-4">
							<select class="form-control" id="field" name="FieldId">
							<c:forEach var="field" items="${fieldListCopy}" varStatus="engineListStatus">
							<c:if test="${field.display_name==null}">
								<option value="${field.fieldId}">${field.name}</option>
							</c:if>	
							<c:if test="${field.display_name!=null}">
							<option value="${field.fieldId}">${field.display_name}</option>
							</c:if>	
							</c:forEach>
							</select>
						</div>
						<label for="engineName" class="col-sm-2 control-label">聚合类型</label>
						  <div class="col-sm-4">
								<select class="form-control" id="aggField" name="aggType">
								<c:forEach var="dictionnary" items="${dictionnaryList}" varStatus="engineListStatus">
								
									<option value="${dictionnary.name}">${dictionnary.value}</option>
								</c:forEach>
								</select>
							</div>
					</div>
					
				
					<div class="form-group">
					<input type="hidden" name="biasingId" value="${biasingId }">
					<input type="hidden" name="chartId" value="${chartId}">
						<label for="engineName" class="col-sm-2 control-label">维度名称</label>
						<div class="col-sm-4">
							<input type="text" class="form-control" id="name"
								name="name" placeholder=""
								autocomplete="off">
						</div>
						<label for="sort" class="col-sm-2 control-label">排序规则</label>
					 	<div class="col-sm-4">
							<select class="form-control" id="sort" name="sort">
								<option value="name_asc">按名称升序</option>
								<option value="name_desc">按名称降序</option>
								<option value="val_asc">按值升序</option>
								<option value="val_desc">按值降序</option>
							</select>
						</div>
						
					</div>
				
					
					<div class="form-group">
						<label for="isSort" class="col-sm-2 control-label">确认排序</label>
					 	<div class="col-sm-10" >
							<input type="checkbox" 
									id="isSort" 
									name="isSort" 
									style=" margin-top: 10px;"
									data-toggle="tooltip" 
									data-placement="right" 
									title="勾选后图表将按此维度排序"
									>
						</div>
					</div>
					
  
  				</div>
				<!-------------------------->
					
					<div class="form-group" id="Cont_3"style="display:none;">
						<label for="engineName" class="col-sm-2 control-label">外链图URL</label>
						<div class="col-sm-10">
							<input type="text" class="form-control" id="src"
								name="src" placeholder=""
								autocomplete="off">
						</div>
					</div>
				
				</div>
				<!-- 模态框效果 -->
				<div class="modal-footer">
					<button type="button" class="btn btn-default fa fa-close" data-dismiss="modal">关闭
					</button>
					<button type="submit" class="btn btn-primary fa fa-check">提交</button>
				</div>
			</form>
		</div>
		<!-- /.modal-content -->
	</div>
	<!-- /.modal -->
</div>
		
		
		
	</body>
</html>
